package models

import (
	"time"
)

type InstalledApp struct {
	Name        string    `json:"name"`
	Path        string    `json:"path"`
	EnName      string    `json:"enName"`
	AppType     string    `json:"appType"`
	Icon        string    `json:"icon"`
	Description string    `json:"description,omitempty"`
	LastUsed    time.Time `json:"lastUsed,omitempty"`
	UseCount    int       `json:"useCount,omitempty"`
	Tags        []string  `json:"tags,omitempty"`
	IsFavorite  bool      `json:"isFavorite,omitempty"`
}

type UserPreferences struct {
	Theme            string   `json:"theme"`
	HotKey           string   `json:"hotKey"`
	MaxResults       int      `json:"maxResults"`
	FavoriteApps     []string `json:"favoriteApps"`
	CustomWebApps    []InstalledApp `json:"customWebApps"`
	ShowInMenuBar    bool     `json:"showInMenuBar"`
	LaunchAtStartup  bool     `json:"launchAtStartup"`
	SearchHistory    []string `json:"searchHistory"`
	DefaultBrowser   string   `json:"defaultBrowser"`
}

type SearchResult struct {
	Apps       []InstalledApp `json:"apps"`
	Suggestions []string      `json:"suggestions"`
	TotalCount int           `json:"totalCount"`
}